<?php

use yii\db\Migration;

/**
 * Handles the creation of table `project_investigation_lawsuit`.
 */
class m171030_072045_create_project_investigation_lawsuit_table extends Migration
{
    /**
     * @inheritdoc
     * 尽调报告-干系人及资产涉诉情况
     */
    public function up()
    {
        $this->createTable('project_investigation_lawsuit', [
            'id' => $this->bigPrimaryKey(),
            'project_id' => $this->bigInteger()->notNull(),
            'records_number' => $this->string()->comment('案号'),
            'accuser' => $this->string()->comment('原告'),
            'defendant' => $this->string()->comment('被告'),
            'money' => $this->string()->comment('涉诉金额'),
            'court' => $this->string()->comment('法院'),
            'lawsuit_content' => $this->text()->comment('涉诉内容'),
            'created_at' => $this->timestamp(),
            'lock_user' => $this->integer()->comment('上锁用户'),
            'lock_timestamp' => $this->string()->comment('上锁时间'),
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('project_investigation_lawsuit');
    }
}
